package cn.mw.cmdb.entity.modelRelation;

import cn.mw.cmdb.entity.PropertyTypeString;
import cn.mw.cmdb.entity.PropertyTypeTime;
import cn.mw.components.mongodb.anno.AutoId;
import cn.mw.components.mongodb.anno.CMDBProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

@Data
@Document("mw_cmdbmd_model_relation_group_info")
@Schema(description = "模型关系分组信息")
public class RelationGroupDTO {
    @CMDBProperty(searchType = PropertyTypeString.ID, searchPrefix = "_")
    @AutoId
    @Schema(description = "id")
    private String id;

    @Schema(description = "模型ID")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String ownModelId;

    @Schema(description = "显示名")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String relationGroupName;

    @Schema(description = "分组描述")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String relationGroupDesc;

    @Schema(description = "是否默认分组")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private boolean defautGroupFlag;

    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    @Schema(description = "创建人")
    protected Long creater;

    @CMDBProperty(searchType = PropertyTypeTime.ID)
    @Schema(description = "创建时间")
    protected Date createTime;

    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    @Schema(description = "修改人")
    protected Long modifier;

    @CMDBProperty(searchType = PropertyTypeTime.ID)
    @Schema(description = "修改时间")
    protected Date modificationTime;
}
